<?php

// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;
//return [
//    //别名配置,别名只能是映射到控制器且访问时必须加上请求的方法
//    '__alias__'   => [
//    ],
//    //变量规则
//    '__pattern__' => [
//    ],
////        域名绑定到模块
////        '__domain__'  => [
////            'admin' => 'admin',
////            'api'   => 'api',
////        ],
//];



// 登录的路由
Route::post('mini/:ver/login', 'mini/:ver.login/login'); //登录
Route::post('mini/:ver/authorization_phone', 'mini/:ver.login/authorization_phone'); //授权获取手机号

//公共
Route::get('mini/amap/citys', 'mini/commons.amap/citys'); // 城市列表
Route::get('mini/index_tip', 'mini/commons.info/index_tip'); // 首页提示
Route::get('mini/amap/citys_new', 'mini/commons.amap/citys_new'); // 城市列表
Route::get('mini/amap/search', 'mini/commons.amap/search_city'); // 城市搜索
Route::get('mini/amap/districts', 'mini/commons.amap/districts'); // 区/县列表
Route::post('mini/file/uploads', 'mini/commons.file/uploads'); // 上传
Route::get('mini/main_business/index', 'mini/commons.main_business/index'); // 主营列表
Route::get('mini/car_brand/index', 'mini/commons.car_brand/brand'); // 汽车品牌
Route::get('mini/car_brand/search', 'mini/commons.car_brand/search_brand'); // 汽车品牌搜索
Route::get('mini/car_brand/series', 'mini/commons.car_brand/series'); // 汽车品牌系列
Route::get('mini/car_brand/models', 'mini/commons.car_brand/models'); // 汽车品牌系列版本
Route::get('mini/car_brand/series_models', 'mini/commons.car_brand/series_models'); // 汽车品牌系列版本
Route::get('mini/goods/index', 'mini/commons.goods/index'); // 商品列表
Route::get('mini/info/share_info', 'mini/commons.info/share_info'); // 商品列表
Route::get('mini/car/car_params', 'mini/commons.car/car_params'); // 车辆编辑参数
Route::get('mini/car/condition', 'mini/commons.car/condition'); // 商机条件


Route::get('mini/:ver/client/agent_info', 'mini/:ver.client.info/agent'); // 获取代理信息
//绑定代理
Route::post('mini/:ver/client/bind_agent', 'mini/:ver.client.member/bind_agent'); //绑定代理
Route::post('mini/:ver/client/remove_bind_agent', 'mini/:ver.client.member/remove_bind_agent'); //解除绑定代理

//店铺成员添加
Route::post('mini/:ver/client/member/add', 'mini/:ver.client.memberApply/add'); // 店铺成员邀请添加


//商机模块
Route::get('mini/:ver/client/service/index', 'mini/:ver.client.service/service'); // 服务列表 ok
////二手车
Route::get('mini/:ver/client/used_car/index', 'mini/:ver.client.usedCar/index');  // 二手车列表
Route::get('mini/:ver/client/used_car/detail', 'mini/:ver.client.usedCar/detail');  // 二手车详情
Route::post('mini/:ver/client/used_car/edit', 'mini/:ver.client.usedCar/edit'); // 二手车新增/编辑
Route::get('mini/:ver/client/used_car/info', 'mini/:ver.client.usedCar/info'); // 二手车信息
////非二手车
Route::get('mini/:ver/client/service_shop/index', 'mini/:ver.client.serviceShop/index');  // 非二手车列表
Route::post('mini/:ver/client/service_shop/edit', 'mini/:ver.client.serviceShop/edit'); // 非二手车新增/编辑
Route::get('mini/:ver/client/service_shop/detail', 'mini/:ver.client.serviceShop/detail'); //商机店铺详情
Route::get('mini/:ver/client/service_shop/info', 'mini/:ver.client.serviceShop/info'); //商机店铺详情



//客户端
Route::get('mini/:ver/client/banner', 'mini/:ver.client.index/banner'); // 首页广告
Route::get('mini/:ver/client/banner_detail', 'mini/:ver.client.index/banner_detail'); // 轮播图详情
Route::get('mini/:ver/client/shop_list', 'mini/:ver.client.index/index'); // 商家列表
Route::get('mini/:ver/client/shop_info', 'mini/:ver.client.index/info');   // 商家详情
Route::get('mini/:ver/client/goods_info', 'mini/:ver.client.index/goodsInfo');   // 产品详情
Route::get('mini/:ver/client/shop_goods_list', 'mini/:ver.client.index/shopGoods');   // 商家产品列表

//发票
Route::get('mini/:ver/client/bill_title', 'mini/:ver.client.billTitle/index');   // 发票抬头列表
Route::get('mini/:ver/client/bill_info', 'mini/:ver.client.billTitle/info');   // 发票抬头信息
Route::post('mini/:ver/client/bill_edit', 'mini/:ver.client.billTitle/edit');   // 发票抬头编辑
Route::post('mini/:ver/client/bill_title_del', 'mini/:ver.client.billTitle/del');   // 发票抬头信息杀出
Route::get('mini/:ver/client/wait_open_bill_orders', 'mini/:ver.client.order/waitOpenBillOrders');   // 可开票订单
Route::post('mini/:ver/client/bill_confirm', 'mini/:ver.client.bill/confirm');   // 发票确认
Route::post('mini/:ver/client/bill_add', 'mini/:ver.client.bill/add');   // 发票提交
Route::get('mini/:ver/client/bill_index', 'mini/:ver.client.bill/index');   // 开票历史
Route::get('mini/:ver/client/bill_detail', 'mini/:ver.client.bill/detail');   // 发票详情
Route::post('mini/:ver/client/bill_cancel', 'mini/:ver.client.bill/cancel');   // 发票取消


//收藏
Route::get('mini/:ver/client/collection/types', 'mini/:ver.client.collection/types'); // 收藏类别
Route::get('mini/:ver/client/collection/xiche', 'mini/:ver.client.collection/xiche'); // 收藏洗车列表
Route::get('mini/:ver/client/collection/used_car', 'mini/:ver.client.collection/used_car'); // 收藏二手车列表
Route::get('mini/:ver/client/collection/service', 'mini/:ver.client.collection/service'); // 收藏非二手车列表
Route::post('mini/:ver/client/collection/add', 'mini/:ver.client.collection/add'); // 添加收藏
Route::post('mini/:ver/client/collection/del', 'mini/:ver.client.collection/del'); // 删除收藏

//商机管理
Route::get('mini/:ver/client/service_shop/my_service', 'mini/:ver.client.serviceShop/my_service');  // 商机列表
Route::get('mini/:ver/client/used_car/my_index', 'mini/:ver.client.usedCar/my_index');  // 二手车列表
Route::post('mini/:ver/client/service/put_up', 'mini/:ver.client.service/put_up');  // 上架
Route::post('mini/:ver/client/service/put_down', 'mini/:ver.client.service/put_down');  // 下架
Route::post('mini/:ver/client/service/del', 'mini/:ver.client.service/del');  // 删除


// 评价
Route::get('mini/:ver/client/comment/content', 'mini/:ver.client.comment/content');      // 预设置评价列表
Route::get('mini/:ver/client/comment/index', 'mini/:ver.client.comment/index');      // 订单评价列表
Route::post('mini/:ver/client/comment/add', 'mini/:ver.client.comment/comment');   // 订单评价
Route::get('mini/:ver/client/comment/count', 'mini/:ver.client.comment/commentCount');   // 订单各评价数量统计


// 订单
Route::get('mini/:ver/client/order_confirm', 'mini/:ver.client.order/order_confirm');   // 订单确认
Route::post('mini/:ver/client/order_submit', 'mini/:ver.client.order/submit');   // 提交订单
Route::get('mini/:ver/client/order_list', 'mini/:ver.client.order/index');       // 订单列表
Route::post('mini/:ver/client/order_cancel', 'mini/:ver.client.order/cancel');   // 订单取消
Route::post('mini/:ver/client/order_pay', 'mini/:ver.client.order/pay');         // 订单支付
Route::get('mini/:ver/client/order_detail', 'mini/:ver.client.order/detail');        // 订单详情
Route::get('mini/:ver/client/order_calculate', 'mini/:ver.client.order/calculate'); // 订单金额计算
Route::get('mini/:ver/client/order_pay_calculate', 'mini/:ver.client.order/calculateByPayType'); // 订单支付金额计算
Route::post('mini/:ver/client/order_apply_refund', 'mini/:ver.client.order/applyRefund');  // 订单申请退款
Route::get('mini/:ver/client/refund_detail', 'mini/:ver.client.order/refundDetail');  // 订单退款详情
Route::get('mini/:ver/client/order_pay_method_info', 'mini/:ver.client.order/orderPayMethodInfo');  // 订单支付方式信息
Route::post('mini/:ver/client/order_wechat_notify', 'mini/:ver.client.order/wechatNotify');  // 订单微信支付回调



// 资金明细
Route::get('mini/:ver/client/recharge_template', 'mini/:ver.client.moneyRecord/getRechargeTemplate'); // 获取充值模版
Route::post('mini/:ver/client/recharge', 'mini/:ver.client.moneyRecord/recharge'); // 充值
Route::post('mini/:ver/client/recharge_notify', 'mini/:ver.client.moneyRecord/rechargeNotify'); // 充值回调
Route::get('mini/:ver/client/consume_record', 'mini/:ver.client.moneyRecord/consumeRecord'); // 会员消费记录
Route::get('mini/:ver/client/recharge_record', 'mini/:ver.client.moneyRecord/rechargeRecord'); // 会员充值记录
Route::get('mini/:ver/client/member_balance', 'mini/:ver.client.member/memberBalance'); // 会员余额
Route::post('mini/:ver/client/member_withdrawal', 'mini/:ver.client.moneyRecord/withdrawal'); // 提现


Route::get('mini/:ver/client/index', 'mini/:ver.client.index/index'); //首页

//我的
Route::get('mini/:ver/client/center/index', 'mini/:ver.client.center/index'); //我的
Route::get('mini/:ver/client/member_info', 'mini/:ver.client.member/info'); //我的信息
Route::post('mini/:ver/client/member_name', 'mini/:ver.client.member/member_name'); //修改姓名
Route::post('mini/:ver/client/birthday', 'mini/:ver.client.member/birthday'); //设置生日
Route::post('mini/:ver/client/sex', 'mini/:ver.client.member/sex'); //设置性别
Route::post('mini/:ver/client/head', 'mini/:ver.client.member/head'); //设置头像
Route::get('mini/:ver/client/permission', 'mini/:ver.client.center/permission'); //角色权限

//优惠券
Route::get('mini/:ver/client/coupon_list', 'mini/:ver.client.coupon/coupon_list'); //获取优惠券列表
Route::post('mini/:ver/client/get_coupon', 'mini/:ver.client.coupon/get_coupon'); //领取优惠券
Route::get('mini/:ver/client/coupon', 'mini/:ver.client.coupon/index'); //获取优惠券
Route::get('mini/:ver/client/coupon_history', 'mini/:ver.client.coupon/history'); //获取优惠券
Route::get('mini/:ver/client/coupon_explain', 'mini/:ver.client.coupon/coupon_explain'); //优惠券说明



Route::get('mini/:ver/client/about', 'mini/:ver.client.center/about'); //关于我们
Route::get('mini/:ver/client/about_list', 'mini/:ver.client.center/about_list'); //关于我们列表



Route::get('mini/:ver/client/brand', 'mini/:ver.client.carBrand/brand'); //品牌列表
Route::get('mini/:ver/client/search_brand', 'mini/:ver.client.carBrand/search_brand'); //品牌搜索
Route::get('mini/:ver/client/car/index', 'mini/:ver.client.car/index'); //我的车辆列表
Route::post('mini/:ver/client/car/del', 'mini/:ver.client.car/del'); //删除车辆
Route::post('mini/:ver/client/car/set_default', 'mini/:ver.client.car/set_default'); //设置默认车辆
Route::get('mini/:ver/client/car/info', 'mini/:ver.client.car/info'); //更多信息
Route::get('mini/:ver/client/car/more_info', 'mini/:ver.client.car/more_info'); //更多信息
Route::post('mini/:ver/client/car/add', 'mini/:ver.client.car/add'); //添加车辆
Route::get('mini/:ver/client/car/series', 'mini/:ver.client.CarSeries/series'); //获取车系列
Route::post('mini/:ver/client/car/update', 'mini/:ver.client.car/update'); //我的车辆信息更新
Route::post('mini/:ver/client/car/update_picture', 'mini/:ver.client.car/update_picture'); //车辆图片更新
Route::get('mini/:ver/client/car/maintain', 'mini/:ver.client.car/maintain'); //保养记录
Route::post('mini/:ver/client/car/ocr', 'mini/:ver.client.car/ocr'); //OCR


//角色切换
Route::get('mini/:ver/client/role_list', 'mini/:ver.client.role/index');  // 角色列表
Route::post('mini/:ver/client/exchange', 'mini/:ver.client.role/exchange');  // 角色切换






//商家端
Route::get('mini/:ver/shop/index', 'mini/:ver.shop.index/index'); //首页
Route::post('mini/:ver/shop/search', 'mini/:ver.shop.index/search'); //车牌或者车架号搜索
Route::post('mini/:ver/shop/ocr', 'mini/:ver.shop.index/ocr'); //车牌或者车架号OCR
Route::get('mini/:ver/shop/shop_info', 'mini/:ver.shop.shop/info'); //商家信息
Route::post('mini/:ver/shop/edit_business_time', 'mini/:ver.shop.shop/editBusinessTime'); // 更新商家营业时间

//切换角色
Route::get('mini/:ver/shop/role_list', 'mini/:ver.shop.role/index');  // 角色列表
Route::post('mini/:ver/shop/exchange', 'mini/:ver.shop.role/exchange');  // 角色切换

//资金明细
Route::get('mini/:ver/shop/money_record', 'mini/:ver.shop.MoneyRecord/index');  // 资金明细

//订单明细
Route::get('mini/:ver/shop/order_list', 'mini/:ver.shop.order/index');  // 订单列表
Route::get('mini/:ver/shop/order_detail', 'mini/:ver.shop.order/detail');  // 订单详情
Route::get('mini/:ver/shop/order_status_num', 'mini/:ver.shop.order/orderStatusNum');  // 订单状态数量
Route::post('mini/:ver/shop/order_use', 'mini/:ver.shop.order/useOrder');  // 核消订单

Route::get('mini/:ver/shop/consume_record', 'mini/:ver.shop.moneyRecord/consumeRecord');  // 商家消费记录
Route::get('mini/:ver/shop/recharge_record', 'mini/:ver.shop.recharge/index'); // 商家充值记录

Route::post('mini/:ver/shop/shop_recharge', 'mini/:ver.shop.recharge/recharge');        // 商家充值申请
Route::post('mini/:ver/shop/recharge_confirm', 'mini/:ver.shop.recharge/confirm'); // 商家确认收款

Route::get('mini/:ver/shop/goods_list', 'mini/:ver.shop.ShopGoods/lists');  // 产品列表
Route::post('mini/:ver/shop/goods_put_away', 'mini/:ver.shop.ShopGoods/putAway');  // 产品上架
Route::post('mini/:ver/shop/goods_sold_out', 'mini/:ver.shop.ShopGoods/soldOut');  // 产品下架
Route::get('mini/:ver/shop/goods_detail', 'mini/:ver.shop.ShopGoods/detail');  // 产品详情
Route::post('mini/:ver/shop/goods_sort', 'mini/:ver.shop.ShopGoods/sort');  // 产品排序

Route::get('mini/:ver/shop/shop_tag_list', 'mini/:ver.shop.shop/tagList');  // 商家标签列表
Route::post('mini/:ver/shop/shop_tag_save', 'mini/:ver.shop.shop/saveTags');  // 保存商家标签


//我的客户
Route::get('mini/:ver/shop/customer/index', 'mini/:ver.shop.Customer/index');  // 客户列表
Route::get('mini/:ver/shop/customer/info', 'mini/:ver.shop.Customer/info');  // 客户信息
Route::post('mini/:ver/shop/customer/car_exchange', 'mini/:ver.shop.Customer/car_exchange');  // 客户信息
Route::get('mini/:ver/shop/customer/orders', 'mini/:ver.shop.Customer/orders');  // 客户信息
Route::get('mini/:ver/shop/customer/more_info', 'mini/:ver.shop.Customer/more_info');  // 更多信息
Route::get('mini/:ver/shop/customer/maintain', 'mini/:ver.shop.Customer/maintain');  // 保养记录
Route::post('mini/:ver/shop/customer/add_maintain', 'mini/:ver.shop.Customer/add_maintain');  // 添加保养记录
Route::get('mini/:ver/shop/customer/maintain_detail', 'mini/:ver.shop.Customer/maintain_detail');  // 保养记录详情
Route::post('mini/:ver/shop/car/update_picture', 'mini/:ver.shop.Customer/update_picture');  // 车辆图片更新 - 商家端视角

//成员管理
Route::get('mini/:ver/shop/member/index', 'mini/:ver.shop.ShopMember/index');  // 成员列表
Route::get('mini/:ver/shop/member/apply_index', 'mini/:ver.shop.ShopMember/apply_index');  // 待审核列表
Route::post('mini/:ver/shop/member/audit', 'mini/:ver.shop.ShopMember/audit');  // 成员审核
Route::get('mini/:ver/shop/member/permissions', 'mini/:ver.shop.ShopMember/permissions');  // 权限列表
Route::post('mini/:ver/shop/member/permission', 'mini/:ver.shop.ShopMember/permission');  // 权限更新
Route::get('mini/:ver/shop/member/audits', 'mini/:ver.shop.ShopMember/audits');  // 待审核数
Route::post('mini/:ver/shop/member/del', 'mini/:ver.shop.ShopMember/del');  // 删除
Route::post('mini/:ver/shop/member/permission_update', 'mini/:ver.shop.ShopMember/permission_update');//权限更新

//商机
Route::get('mini/:ver/shop/service/index', 'mini/:ver.shop.service/index');  // 商机类别列表
Route::get('mini/:ver/shop/used_car/index', 'mini/:ver.shop.used_car/index');  // 二手车列表
Route::get('mini/:ver/shop/service_shop/index', 'mini/:ver.shop.service_shop/index');  // 非二手车列表
Route::post('mini/:ver/shop/service_shop/edit', 'mini/:ver.shop.service_shop/edit');  // 非二手车商机编辑
Route::post('mini/:ver/shop/used_car/car_edit', 'mini/:ver.shop.used_car/car_edit');  // 二手车编辑
Route::get('mini/:ver/shop/service_shop/main_business', 'mini/:ver.shop.service_shop/main_business');  // 主营业务
Route::get('mini/:ver/shop/service_shop/info', 'mini/:ver.shop.serviceShop/info'); //商机店铺信息
Route::get('mini/:ver/shop/used_car/info', 'mini/:ver.shop.used_car/info'); //二手车信息

//评价
Route::get('mini/:ver/shop/comment/index', 'mini/:ver.shop.comment/index');  // 列表
Route::get('mini/:ver/shop/comment/count', 'mini/:ver.shop.comment/commentCount');   // 订单各评价数量统计

//核销
Route::get('mini/:ver/shop/audit/detail', 'mini/:ver.shop.audit/detail');  // 订单详情
Route::post('mini/:ver/shop/audit/change_car', 'mini/:ver.shop.audit/change_car');  // 更改订单车牌号
Route::post('mini/:ver/shop/audit/confirm', 'mini/:ver.shop.audit/audit_confirm');  // 确认核销

//商机管理
Route::get('mini/:ver/shop/service_shop/my_service', 'mini/:ver.shop.serviceShop/my_service');  // 商机列表
Route::get('mini/:ver/shop/used_car/my_index', 'mini/:ver.shop.usedCar/my_index');  // 二手车列表
Route::post('mini/:ver/shop/service/put_up', 'mini/:ver.shop.service/put_up');  // 上架
Route::post('mini/:ver/shop/service/put_down', 'mini/:ver.shop.service/put_down');  // 下架
Route::post('mini/:ver/shop/service/del', 'mini/:ver.shop.service/del');  // 删除